<%@ page language="java" import="java.util.*, java.text.*,com.zjut.zs.util.tools.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.exvalue.manager.*, com.zjut.zs.exvalue.dao.*,com.zjut.zs.coname.manager.*, 
com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*,
com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,com.zjut.zs.coname.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src='../plugins/assets/plugins/jquery-3.5.1.min.js'></script>
</head>

<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
<%
if (session.getAttribute("zsUser") == null&&session.getAttribute("admin") == null&&session.getAttribute("user") == null) {
	out.print("<script>alert('由于长时间未操作，系统已经自动注销，请重新登陆');</script>");
	out.print("<script>top.window.location='main.jsp';</script>");
} else {

AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsCoNameManager comanager = (ZsCoNameManager) SpringContextUtil.getBean("ZsCoNameManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");
ZsExValueManager emanager = (ZsExValueManager) SpringContextUtil.getBean("ZsExValueManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsUserStatusManager smanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsExValue exv = new ZsExValue();
ZsUser user = null;
if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");	
} 		
if (user!=null) {
	exv.setZsUser(user);										
	List list = emanager.getDataByInstance(1,1,null,null,exv).getObjects();
	if (list.size()>0) {
		exv = (ZsExValue)list.get(0);
	}
}
ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);
ZsUserStatus userStatus = smanager.getDataByUser(user);
 %>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">报考信息填写</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>报考信息填写</span></div>
    <form id="ff" name="add" role="form" class="form-horizontal" action="" method="post">  
	    <ul class="forminfo">
	    <li <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column1").getAddPermit()))out.print("style='display:none'"); %>><label><%=comanager.getDataByCoEn("column1").getCoCn() %><b>*</b></label><select id="column1" name="column1" type="text" class="dfinput" required/><option value="<%=html.getInputString(exv.getColumn1()) %>" selected><%=html.getInputString(exv.getColumn1()) %></option></select><i></i></li>
	    <li <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column2").getAddPermit()))out.print("style='display:none'"); %>><label><%=comanager.getDataByCoEn("column2").getCoCn() %><b>*</b></label><select id="column2" name="column2" type="text" class="dfinput" required/><option value="<%=html.getInputString(exv.getColumn2()) %>" selected><%=html.getInputString(exv.getColumn2()) %></option></select><i></i></li>
	    <li <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column3").getAddPermit()))out.print("style='display:none'"); %>><label><%=comanager.getDataByCoEn("column3").getCoCn() %><b>*</b></label><select id="column3" name="column3" type="text" class="dfinput" required/><option value="<%=html.getInputString(exv.getColumn3()) %>" selected><%=html.getInputString(exv.getColumn3()) %></option></select><i></i></li>
	    <li <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column4").getAddPermit()))out.print("style='display:none'"); %>><label><%=comanager.getDataByCoEn("column4").getCoCn() %><b>*</b></label><select id="column4" name="column4" type="text" class="dfinput" required/><option value="<%=html.getInputString(exv.getColumn4()) %>" selected><%=html.getInputString(exv.getColumn4()) %></option></select><i></i></li>
	    <li <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column5").getAddPermit()))out.print("style='display:none'"); %>><label><%=comanager.getDataByCoEn("column5").getCoCn() %><b>*</b></label><select id="column5" name="column5" type="text" class="dfinput" required/><option value="<%=html.getInputString(exv.getColumn5()) %>" selected><%=html.getInputString(exv.getColumn5()) %></option></select><i></i></li>
	    
	    
	    <li><label>&nbsp;</label>
	    <input id="exvId" name="exvId" type="text" class="dfinput" value="<%if(null==exv.getExvId()){out.print("");}else{out.print(exv.getExvId());}; %>"  style="display:none;"/>
	    <input id="scCode" name="scCode" type="text" class="dfinput" value="<%=school.getScCode()%>"  style="display:none;"/>
		<input id="zsUser.usId" name="zsUser.usId" type="text" class="dfinput" value="<%=exv.getZsUser().getUsId() %>"  style="display:none;"/>
		
		<%
		if(!Status.ON.getStatus().equals(school.getScAppActive()) || !Status.ON.getStatus().equals(school.getScExvalueActive()) ){ %>
		<button type="submit" class="btndisable" disabled>已截止</button>
		<%} else if(!Status.APPSTATUS_YES.getStatus().equals(userStatus.getAppStatus()) && !Status.APPSTATUS_BACK.getStatus().equals(userStatus.getAppStatus())){ %>
		<button type="submit" class="btn btn-primary btn-sm">保存</button>
		<%} else {%>
		<button type="submit" class="btndisable" disabled>已确认</button>
		<%} %>
	    </ul>
    </form>
    
    </div>
    
    
<div style="margin:50px;"><%out.print(anconfig.getSingleConfigInfoByName("报考信息填写需知")); %></div>
    
    
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.validate.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.metadata.js" type="text/javascript"></script>
<script src="js/formvalidate.js" type="text/javascript"></script>
<script src="../admin/js/publicManager.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript">
var updateOneAction = '../zsExValueSave.action?randnum='+Math.floor(Math.random()*1000000);
var loactionurl = 'zs_exvalue.jsp';
		$(function(){
		
		    //jquery.validate
			$("#ff").validate({
				submitHandler: function() {
					//验证通过后 的js代码写在这里
					submitFormAdvance();
				}
			})				
		})
</script>
<script type="text/javascript">
<%=school.getScExvJs() %>
</script> 

<%} %>
</body>

</html>
